<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>新闻发布页面</title>
		<jsp:include page="/common/head.jsp"></jsp:include>
		<script type="text/javascript" src="common/jquery-xheditor/xheditor-1.1.11-zh-cn.min.js"></script>
		<script type="text/javascript" src="common/js/upload.js"></script>
		<script type="text/javascript">
			$(pageInit);
		</script>
	</head>
	<body>
	<div align="center"><font color="red"><c:out value="${addNewsMessage}"></c:out></font></div>
		<form   id="frmDemo" action="maintain_NewsAction_addNews_post.do"  enctype="multipart/form-data" method="post">
			<table width="85%" align="center" border="1  solid red"  cellpadding="2" cellspacing="0">
			<tr bgcolor="#95CACA">
			<td align="center" height="25"  colspan="2">&nbsp;&nbsp;<strong>添加新闻</strong></td>
			</tr>
			<tr>
			<td  width="16%">&nbsp;&nbsp;
			<strong>所属分类：
			</strong>
			</td>
			<td>
			<select id="newsClassSelect" name="newsClassSelect" style="width: 140px; height: 24px">
			<c:forEach items="${allNewsClass}" var="newsClass">
			<option value="${newsClass.newClassId}">${newsClass.newClassName}</option>
			</c:forEach>
			</select>
			</td>
			</tr>
			<tr>
			<td  width="16%">&nbsp;&nbsp;<strong>新闻标题：</strong></td>
			<td><input type="text" style="width:200px" name="newsTitle" value="${news.newsTitle}"></td>
			</tr>
			<tr>
			<td  width="16%">&nbsp;&nbsp;<strong>新闻图片：</strong></td>
			<td>
			  <input type="file" id="myfile" name="myfile" value="浏览图片" style="height:24px;width:350px"/>(只能上传jpg,jpeg,bmp,gif,png格式的图片)
		    <font color="red"> <c:out value="${uploadMessage}"></c:out> </font>
			 <!--   <input type="button" name="上传" value="上传"  style="height:24px;width:50px" onclick="uploadFile('servlet/UpDownLoadFile')"/> -->
			</td>
			
			</tr>
			<tr>
			<td  valign="top" width="16%">&nbsp;&nbsp;<strong>新闻内容:</strong></td>
			<td>
			   <textarea id="elm1" name="elm1" rows="18" cols="100" style="width: 100%"></textarea>
			</td>
			</tr>
			<tr>
			<td  width="16%">&nbsp;&nbsp;&nbsp;&nbsp;<strong>点击数：</strong></td>
			<td><input type="text" style="width:80px" name="hitNumber"></td>
			</tr>
				<tr>
			<td  width="16%">&nbsp;&nbsp;&nbsp;&nbsp;<strong>发布人：</strong></td>
			<td><input type="text" style="width:150px" name="createPerson"></td>
			</tr>
			<tr>
			<td  width="16%">&nbsp;&nbsp;<strong>发布时间：</strong></td>
			<td><input type="text" style="width:200px" name="addTime">(2010-02-09)</td>
			</tr>
			<tr>
			<td  width="16%">&nbsp;&nbsp;<strong>新闻来源：</strong></td>
			<td><input type="text" style="width:200px" name="isOrign"></td>
			</tr>
			<tr>
			<td colspan='2' align="center">
			<input type="submit" name="save" value="提交" />
			<input type="reset" name="reset" value="清空" />
			</td>
			</tr>
			</table>
			<br />
		</form>
	    <div id="uploadList"></div>
		
	</body>
</html>
